<template>
	<view class="hotspot-wap">
		<view class="hotspot-image">
			<image src="../../../static/index/rdfw.png" mode="widthFix"></image>
		</view>
		<view class="hotspot_box">
			<view class="hotspot-text">
				<text>热点服务</text>
				<view class="hotspot-dw">
					<u-icon name="map-fill" color="#c40200" size="34"></u-icon>
					<text v-if="showTitle">{{showTitle}}</text>
					<text class="region_switch" :select-open="pickerShow" @click="pickerShow = true">
						切换城市
						<u-icon name="arrow-down" color="#c40200" style= "margin-left: 10rpx;" size="26"></u-icon>
					</text>
					<u-picker mode="region" v-model="pickerShow" @confirm="regionConfirm"></u-picker>
				</view>
			</view>
			<u-line color="#E6E6E6" />
			<view class="hotspot_cont">
				<u-tabs class="hotspot_nav" name="cate_name" count="cate_count" :list="list" :is-scroll="false" :current="current"
				 @change="change" inactive-color="#333333" active-color="#c40200" height="90" bar-height="5" bar-width="30"
				 font-size="30"></u-tabs>
				<view class="hotspot_list" v-if="current == 0">
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/atlas/Atlas',{current:1})">
						<image src="@/static/index/tjgf_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								图集规范
							</view>
							<view class="hotspot_list_bot">
								<text>国标、行业、地方</text>
							</view>
						</view>
					</view>

					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/skill-improvement/skill-improvement')"  >
						<image src="@/static/index/flfw_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								技能提升
							</view>
							<view class="hotspot_list_bot"> 
								<text>工艺、交底、书籍</text>
							</view>
						</view>
					</view>

					<view class="hotspot_list_box"  @click="goNext('to','/pages/HomeLnner/device/Device')">
						<image src="@/static/index/bxfw_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								设备租售
							</view>
							<view class="hotspot_list_bot">
								<text>租赁、销售、服务</text>
							</view>
						</view>
					</view>

					<view class="hotspot_list_box"  @click="goNext('to','/pages/HomeLnner/resume/resume')"> 
						<image src="@/static/index/zgz_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								人才交流
							</view>
							<view class="hotspot_list_bot">
								<text>求职、晋升、培训</text>
							</view>
						</view>
					</view>

					<view class="hotspot_list_box"  @click="goNext('to','/components/common/no-message')">
						<image src="@/static/index/sbzs_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								法律服务
							</view> 
							<view class="hotspot_list_bot">
								<text>咨询、援助、代理</text>
							</view>
						</view>
					</view>

					<view class="hotspot_list_box" @click="goNext('to','/components/common/no-message')">
						<image src="@/static/index/qtfw_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								保险服务
							</view>
							<view class="hotspot_list_bot">
								<text>咨询、援助、代理</text>
							</view>
						</view>
					</view>
					
				</view>
				<view class="hotspot_list" v-if="current == 1">
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/merchant-settlement/merchant-settlement')">
						<image src="/static/common/enterprise_03.jpg" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								商城入驻
							</view>
							<view class="hotspot_list_bot">
								<text>企业实名 匹配信息</text>
							</view>
						</view>
					</view>
				
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/merchant-settlement/merchant-settlement')">
						<image src="/static/common/enterprise_05.jpg" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								设备租售
							</view>
							<view class="hotspot_list_bot">
								<text>设备租赁 设备租售</text>
							</view>
						</view>
					</view>
				
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/merchant-settlement/merchant-settlement')">
						<image src="/static/common/enterprise_09.jpg" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								图集规范
							</view>
							<view class="hotspot_list_bot">
								<text>国标、行业、地方</text>
							</view>
						</view>
					</view>
				
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/merchant-settlement/merchant-settlement')">
						<image src="/static/common/enterprise_11.jpg" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								资料表格
							</view>
							<view class="hotspot_list_bot">
								<text>工艺、交底、书籍</text>
							</view>
						</view>
					</view>
				
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/merchant-settlement/merchant-settlement')">
						<image src="/static/common/enterprise_15.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								诚聘英才
							</view>
							<view class="hotspot_list_bot">
								<text>职位发布</text>
							</view>
						</view>
					</view>
					
					<view class="hotspot_list_box" @click="goNext('to','/pages/HomeLnner/merchant-settlement/merchant-settlement')">
						<image src="@/static/index/qtfw_logo.png" mode="widthFix"></image>
						<view class="hotspot_list_text">
							<view class="hotspot_list_top">
								需求服务
							</view>
							<view class="hotspot_list_bot">
								<text>法律、财税</text>
							</view>
						</view>
					</view>
					
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			address: {
				type: String,
				required: true
			},
		},
		data() {
			return {
				list: [{
					cate_name: '个人服务'
				}, {
					cate_name: '企业服务'
				}],
				current: 0,
				pickerShow: false,
				region: "",
			}
		},
		methods: {
			change(index) {
				this.current = index;
			},
			regionConfirm(e) {
				this.region = e.province.label + ' ' + e.city.label
			},
			goNext(type,url,params){
				this.$u.route({
					type:type,
					url: url,
					params:params
				})
			}
		},
		computed: {
			showTitle() {
				return this.region ? this.region : this.address;
			},
		},
		
	}
</script>

<style scoped lang="scss">
	.hotspot-wap {
		background-color: #fff;

		.hotspot-image {
			width: 100vw;

			image {
				width: 100vw;
			}
		}

		.hotspot_box {
			padding: 40rpx 0rpx;

			.hotspot-text {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 40rpx;
				padding: 0rpx 30rpx;
				>text {
					font-size: 34rpx;
					font-weight: bold;
					color: #000000;
				}

				.hotspot-dw {

					text {
						font-size: 24rpx;
						color: #333333;
						margin: 0 20rpx 0 12rpx;
					}

					.region_switch {
						font-size: 24rpx;
						color: #000;
					}
				}
			}

			.hotspot_cont {
				padding: 0rpx 30rpx;
				margin-top: 10rpx;
				.hotspot_nav {
					margin-bottom: 28rpx;
				}

				.hotspot_list {
					display: flex;
					justify-content: space-between;
					flex-wrap: wrap;

					.hotspot_list_box {
						display: flex;
						justify-content: center;
						width: 335rpx;
						height: 150rpx;
						background: #FFFFFF;
						box-shadow: 0rpx 1rpx 10rpx 0rpx #E6E6E6;
						border-radius: 5rpx;
						padding: 40rpx 20rpx 0 20rpx;
						&:nth-child(-n+4) {
							margin-bottom: 20rpx;
						}

						image {
							width: 65rpx;
							margin-right: 27rpx;
						}

						.hotspot_list_text {
							flex: 1;
							.hotspot_list_top {
								font-size: 28rpx;
								color: #000000;
								margin-bottom: 15rpx;
							}

							.hotspot_list_bot {
								font-size: 24rpx;
								color: #808080;

							}
						}
					}

				}
			}
		}
	}
</style>
